Conversation
jameshiebert
requested changes
Aug 1, 2023
Contributor
jameshiebert
left a comment
There was a problem hiding this comment.
The overall structure of the approach that you've taken looks great, but I have a couple of questions/comments that I think need to be addressed.
If you're able to write some unit tests that exercise these new functions, I think that would be helpful, because my read of the get_network() function is that it will not work (w.r.t. the caching) as written.
jameshiebert
requested changes
Aug 8, 2023
Contributor
jameshiebert
left a comment
There was a problem hiding this comment.
It's looking much better! Good work 👍
A few more comments that I think will further improve the code.
jameshiebert
requested changes
Aug 9, 2023
Contributor
jameshiebert
left a comment
There was a problem hiding this comment.
Looks much better! Last two comments and then I think we're done:
- I think
log_helpersas a separate module is a good idea for these two functions. However, the name is a bit of a misnomer, sincecached_functionisn't really used in logging. How aboutdb_helpers.py? - I think that it's important for db_metrics to be returned (or
yielded) per network. Different networks have different performance characteristics. I'd like to you swap the loops there and have each per-network iterationyieldthe db metrics results. You may need to adjust the calling code inprocess.pyto make it work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added two functions to insert.py that will sort an arbitrary list of observations into a dictionary where <network_name> is the key. This way network-level logging is maintained even if calls to insert have observations from multiple networks.
resolves #97